<template>
  <VMdPreview :text="source" />
</template>

<script setup name="VMdEditor">
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';

import hljs from 'highlight.js';

const props = defineProps({
  source: {
    type: String,
    default: ''
  }
})

VMdPreview.use(githubTheme, {
  Hljs: hljs,
});

console.log('v-md-editor', props.source)
</script>
